<?php

namespace app\admin\controller;

use app\AdminController;
use think\facade\View;

class Admin extends AdminController
{
    public function index()
    {
        View::assign('name', 'ThinkPHP');
        View::assign('email', 'thinkphp@qq.com');
        View::assign([
            'name' => 'ThinkPHP',
            'email' => 'thinkphp@qq.com'
        ]);
        return View::fetch();
    }

    public function hello($name = 'ThinkPHP6')
    {
        return 'hello,' . $name;
    }

    public function addonss()
    {
        echo $this->app->addons->getAddonsPath();
    }

    # 自增
    public function add()
    {

        halt(123);
    }
}